﻿@model AuthoSYS.EF.Module
@{
    ViewBag.Title = "Create";
}
<h2>
    Create</h2>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Module</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.AppId, "Application")
        </div>
        <div class="editor-field">
            @Html.DropDownList("AppId", String.Empty)
            @Html.ValidationMessageFor(model => model.AppId)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ModuleName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ModuleName)
            @Html.ValidationMessageFor(model => model.ModuleName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ParentId)
        </div>
        <div class="editor-field">
            @Html.Action("GetModuleList", new { id = Model.Id, parentId = string.Empty, appId = Model.AppId })
            @Html.ValidationMessageFor(model => model.ParentId)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.IsLocked)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsLocked)
            @Html.ValidationMessageFor(model => model.IsLocked)
        </div>        

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index", new { appId = Model.AppId })
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
